package com.bigShen.mybatis.conf;

import com.bigShen.mybatis.util.SqlCommandType;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author eddy.shen
 * @Date 2018/12/8 21:04
 **/
public class ConfigurationShen {

    private static Map<String, String> sqlMap = new HashMap<String, String>();

    private static  Map<String, SqlCommandType> sqlCommandTypeMap = new HashMap<String, SqlCommandType>();

    static {
        parseXml();
    }

    public String getSql(String sqlId) {
        return sqlMap.get(sqlId);
    }

    public SqlCommandType getSqlCommandType(String sqlId) {
        return sqlCommandTypeMap.get(sqlId);
    }

    private static void parseXml() {
        sqlMap.put("com.bigShen.use.dao.UserInfoMapper.selectUserByName", "SELECT * FROM TTRD_AUTH_USER WHERE USER_NAME = ?");
        sqlCommandTypeMap.put("com.bigShen.use.dao.UserInfoMapper.selectUserByName", SqlCommandType.SELECT);
    }

}
